#pragma once

#include "fxcc/core/platform/glfw/pch.h"
#include "fxcc/core/platform/common/App.h"
#include "fxcc/core/platform/glfw/Callbacks.h"
#include "fxcc/core/platform/glfw/GlfwTimer.h"

namespace fxcc
{
    namespace platform
    {
        namespace glfw
        {
            struct FXCC_API App :public fxcc::platform::common::App
            {
                GlfwTimer m_GlfwlTimer;

                App(const App::Desc& desc);

                virtual bool Init();

                bool InitGlfw();

                void GetJoyStickDevices();

                void OnJoystick();

                void OnUpdate();

                void OnDestroy();

            public:
                GLFWwindow* m_GlfwWindow = nullptr;

                std::unordered_map<int, int> m_HintMap;

                virtual void OnFramebuffersize(int w, int h);

                virtual void OnWindowPos(int x, int y);

                virtual void OnFocus(int e);

                virtual void OnIconify(int e);
                
                virtual void OnClose() ;
                
                virtual void OnRefresh();

                virtual void OnMonitor(int e);


            };
        };
    };
}
